/*
 * mros-v42.h
 *
 *  Created on: 04-09-2012
 *      Author: mith
 */

#ifndef MROS_V42_H_
#define MROS_V42_H_

// BASIC LIBLARIES
#include<cstdlib>
#include<cstdio>
#include<iostream>
#include<math.h>
#include<time.h>

// For Mathematica

#define Sqrt sqrt
#define Power pow

// CONSTANTS

#define MAX_N_ITERATIONS 100
#define PRECISION 1e-11
#define DEBUG 0
#define DEBUG2 0
#define DEEP_DEBUG 0

// Smal functions

inline int logabs10(double d) {
	double w = d;
	if(w < 0) { w = -w; } // abs
	w = log(w)/log(10);
	if(w < -99) { w = -99; }
	return (int)w;
}

inline double myabs(double x) {
	if(x < 0) {
		return -x;
	}
	return x;
}

inline int sign(double x) {
	if(x<0) {
		return -1;
	}
	return 1;
}

#endif /* MROS_V42_H_ */
